package com.rocky.project.model.base;

import java.io.Serializable;
import java.util.Date;

/**
 * @author Rocky.Shen  ID  增加 修改(person ip datetime)  描述 关键字  删除状态
 * 
 * All Entity Model need extend this class.
 */
public class BaseEntity implements Serializable {

	private static final long serialVersionUID = -2344438523186505173L;

	private Long id = new Long("-1");

	private boolean isDeleted = false;

	private String creator = "admin";

	private Date createTime = new Date();

	private String createIp;

	private String modifier;

	private Date modifyTime = new Date();

	private String modifyIp;
	
	private Integer showindex=999999999;// 显示序号	

	private String keyword;// 关键字
	
	private String description;//说明性文字

	private String memo;// 描述 说明性文字二



	public BaseEntity() {
	}
	/**
	 * @hibernate.property column = "keyword" type = "string" 
	*/
	public String getKeyword() {
		return keyword;
	}

	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}
	/**
	 * @hibernate.property column = "memo" type = "string"
	 */
	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}
	/**
	 * @hibernate.property column = "showindex" type = "integer" 
	 */
	public Integer getShowindex() {
		return showindex;
	}

	public void setShowindex(Integer showindex) {
		this.showindex = showindex;
	}

	/**
	 * @hibernate.property column = "createtime" type = "java.util.Date"
	 */
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	/**
	 * @hibernate.property column = "isdeleted" type = "boolean" 
	 */
	public boolean isDeleted() {
		return isDeleted;
	}

	public void setDeleted(boolean deleted) {
		this.isDeleted = deleted;
	}

	/**
	 * @hibernate.property column = "creator" type = "string" 
	 */
	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	/**
	 * @hibernate.id column="id" unsaved-value="-1" generator-class="native"  type="java.lang.Long"
	 */
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setId(long id) {
		this.id = new Long(id);
	}

	public String toString() {
		StringBuffer buffer = new StringBuffer();
		String cls = getClass().getName();
		String cln = cls.substring(cls.lastIndexOf('.') + 1);
		buffer.append("[" + cln + "] ");
		buffer.append("ID = " + this.id + ", ");
		buffer.append("CREATE_TIME = " + this.createTime + ", ");
		buffer.append("MODIFY_TIME = " + this.modifyTime + ", ");
		buffer.append("IS_DELETED = " + this.isDeleted + ", ");
		buffer.append("CREATOR = " + this.creator + ", ");
		return buffer.toString();
	}

	/**	length="5000"
	 * @hibernate.property column="description" length="1000" type="string"
	 */
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @hibernate.property column="createip" type="string" length = "32"
	 */
	public String getCreateIp() {
		return createIp;
	}

	public void setCreateIp(String createIp) {
		this.createIp = createIp;
	}

	/**
	 * @hibernate.property column="modifier" type="string" length = "32"
	 */
	public String getModifier() {
		return modifier;
	}

	public void setModifier(String modifier) {
		this.modifier = modifier;
	}

	/**
	 * @hibernate.property column="modifyip" type="string" length = "32"
	 */
	public String getModifyIp() {
		return modifyIp;
	}

	public void setModifyIp(String modifyIp) {
		this.modifyIp = modifyIp;
	}

	/**
	 * @hibernate.property column = "modifytime" type = "java.util.Date"
	 *                    
	 * @return modify date
	 */
	public Date getModifyTime() {
		return modifyTime;
	}

	public void setModifyTime(Date modifyTime) {
		this.modifyTime = modifyTime;
	}
}
